#pragma once

#include "imglib/imageclass_decl.h"
#include "typelib/types.h"

namespace refine {

namespace refine2 {

typedef img::bitmap mask;
typedef bool mask_value;

struct params 
{
	params(); ///< loads default params

	int		max_motion; ///< [1, inf)
	int		max_level;  ///< [1, 5]
	bool	silent;

	mask *	modifiable; ///< 0 means every pixel is permitted to change
};

void track(
	const byte_image & ref_im, const mask & ref_m, 
	const byte_image & tgt_im, mask & tgt_m, 
	const params & p = params()
);

} //namespace refine2

} //namespace refine
